package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户收藏
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_collect")
public class UserCollect extends Model<UserCollect> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "cid", type = IdType.ASSIGN_ID)
    private String cid;
    /**
     * 收藏时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 用户唯一标识
     */
    @TableField("user_id")
    private String userId;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;

    public void freeData() {
        this.cid = null;
        this.addTime = null;
        this.userId = null;
        this.parkId = null;
    }

}
